

local const_ = {
	auth = 'xZtXkxJFyhHbfSbOXs6NflySwUHGCnLI',
	ip1 = '192.168.1.11',      --ma_map   us     --cm rent posting recommend subsp map_kv
	ip2 = '192.168.1.105',     --ssdb2    hk dc  --ma_5-9comm
	-- ip3 = '192.168.1.109',     --ssdb3    us     --map  已经迁移到新10台机器
	ip4 = '192.168.1.113',     --ssdb4    us     --ma_0-4

	--manor dc aliyun jolin 
	manor_ip1 = "192.168.1.111", 	-- //47.251.13.94
	manor_ip2 = "192.168.1.114", 	-- //47.88.8.161


	ip_map_00 = '172.16.10.198',
	ip_map_01 = '172.16.10.196',
	ip_map_02 = '172.16.10.200',
	ip_map_03 = '172.16.10.199',
	ip_map_04 = '172.16.10.197',

	ip_map_05 = '172.16.10.15',
	ip_map_06 = '172.16.10.16',
	ip_map_07 = '172.16.10.17',
	ip_map_08 = '172.16.10.18',
	ip_map_09 = '172.16.10.19',

	posting_ip1 = '192.168.1.121',

	cm_ip1 = '192.168.1.122',

	subsp_ip1 = '192.168.1.123',

	rcm_ip1 = '192.168.1.123',

	rent_ip1 = '192.168.1.124',

	ma_mission_ip1 = '192.168.1.113',
	ma_mission_ip2 = '192.168.1.120',

	--manor dc aliyun jolin 
--	manor_ip1 = "192.168.1.111", 	-- //47.251.13.94
--	manor_ip2 = "192.168.1.114", 	-- //47.88.8.161

	--group dc
	ip_group_1 = '192.168.10.100',

	business_mall_ip0   = "192.168.1.137",
	business_mall_ip1   = "192.168.1.136",

	business_advert_ip1 = "192.168.2.50",
	business_advert_ip2 = "192.168.2.48",

	business_welfare_ip0 = "192.168.1.137",
	business_welfare_ip1 = "192.168.1.136",

};


local ns_config = {
	_VERSION = '0.12.1',
	__DAY_TIME__    = 86400,

	ssdb = {

		posting = {
			ssdb_server = {
				[0] = { ip = const_.posting_ip1, port = 17260, auth = const_.auth, },
				[1] = { ip = const_.posting_ip1, port = 17261, auth = const_.auth, },
				[2] = { ip = const_.posting_ip1, port = 17262, auth = const_.auth, },
				[3] = { ip = const_.posting_ip1, port = 17263, auth = const_.auth, },
				[4] = { ip = const_.posting_ip1, port = 17264, auth = const_.auth, },
				[5] = { ip = const_.posting_ip1, port = 17265, auth = const_.auth, },
				[6] = { ip = const_.posting_ip1, port = 17266, auth = const_.auth, },
				[7] = { ip = const_.posting_ip1, port = 17267, auth = const_.auth, },
				[8] = { ip = const_.posting_ip1, port = 17268, auth = const_.auth, },
				[9] = { ip = const_.posting_ip1, port = 17269, auth = const_.auth, },
			},

			ssdb_db_select = {
				[0] = 0, [1] = 1, [2] = 2, [3] = 3, [4] = 4, [5] = 5, [6] = 6, [7] = 7, [8] = 8, [9] = 9,
			},
		},


		subsp = {
			ssdb_server = {
				[0] = { ip = const_.subsp_ip1, port = 18100, auth = const_.auth, },
				[1] = { ip = const_.subsp_ip1, port = 18101, auth = const_.auth, },
				[2] = { ip = const_.subsp_ip1, port = 18102, auth = const_.auth, },
				[3] = { ip = const_.subsp_ip1, port = 18103, auth = const_.auth, },
				[4] = { ip = const_.subsp_ip1, port = 18104, auth = const_.auth, },
				[5] = { ip = const_.subsp_ip1, port = 18105, auth = const_.auth, },
				[6] = { ip = const_.subsp_ip1, port = 18106, auth = const_.auth, },
				[7] = { ip = const_.subsp_ip1, port = 18107, auth = const_.auth, },
				[8] = { ip = const_.subsp_ip1, port = 18108, auth = const_.auth, },
				[9] = { ip = const_.subsp_ip1, port = 18109, auth = const_.auth, },
			},

			ssdb_db_select = {
				[0] = 0, [1] = 1, [2] = 2, [3] = 3, [4] = 4, [5] = 5, [6] = 6, [7] = 7, [8] = 8, [9] = 9,
			},
		},


		rcm = {		-- 未再使用
			ssdb_server = {
				[0] = { ip = const_.rcm_ip1, port = 17280, auth = const_.auth, },
				[1] = { ip = const_.rcm_ip1, port = 17281, auth = const_.auth, },
				[2] = { ip = const_.rcm_ip1, port = 17282, auth = const_.auth, },
				[3] = { ip = const_.rcm_ip1, port = 17283, auth = const_.auth, },
				[4] = { ip = const_.rcm_ip1, port = 17284, auth = const_.auth, },
				[5] = { ip = const_.rcm_ip1, port = 17285, auth = const_.auth, },
				[6] = { ip = const_.rcm_ip1, port = 17286, auth = const_.auth, },
				[7] = { ip = const_.rcm_ip1, port = 17287, auth = const_.auth, },
				[8] = { ip = const_.rcm_ip1, port = 17288, auth = const_.auth, },
				[9] = { ip = const_.rcm_ip1, port = 17289, auth = const_.auth, },
			},

			ssdb_db_select = {
				[0] = 0, [1] = 1, [2] = 2, [3] = 3, [4] = 4, [5] = 5, [6] = 6, [7] = 7, [8] = 8, [9] = 9,
			},
		},


		map = {
			ssdb_server = {
				[0] = {	 ip = const_.ip_map_00,    port = 17200,  auth=const_.auth, },
				[1] = {	 ip = const_.ip_map_01,    port = 17201,  auth=const_.auth, },
				[2] = {	 ip = const_.ip_map_02,    port = 17202,  auth=const_.auth, },
				[3] = {	 ip = const_.ip_map_03,    port = 17203,  auth=const_.auth, },
				[4] = {	 ip = const_.ip_map_04,    port = 17204,  auth=const_.auth, },
				[5] = {	 ip = const_.ip_map_05,    port = 17205,  auth=const_.auth, },
				[6] = {	 ip = const_.ip_map_06,    port = 17206,  auth=const_.auth, },
				[7] = {	 ip = const_.ip_map_07,    port = 17207,  auth=const_.auth, },
				[8] = {	 ip = const_.ip_map_08,    port = 17208,  auth=const_.auth, },
				[9] = {	 ip = const_.ip_map_09,    port = 17209,  auth=const_.auth, },
			},

			ssdb_db_select = {
				[0] = 0, [1] = 1, [2] = 2, [3] = 3, [4] = 4, [5] = 5, [6] = 6, [7] = 7, [8] = 8, [9] = 9,
			},
		},

		rent = {
			ssdb_server = {
				[0] = { ip = const_.rent_ip1, port = 17270, auth = const_.auth, },
				[1] = { ip = const_.rent_ip1, port = 17271, auth = const_.auth, },
				[2] = { ip = const_.rent_ip1, port = 17272, auth = const_.auth, },
				[3] = { ip = const_.rent_ip1, port = 17273, auth = const_.auth, },
				[4] = { ip = const_.rent_ip1, port = 17274, auth = const_.auth, },
				[5] = { ip = const_.rent_ip1, port = 17275, auth = const_.auth, },
				[6] = { ip = const_.rent_ip1, port = 17276, auth = const_.auth, },
				[7] = { ip = const_.rent_ip1, port = 17277, auth = const_.auth, },
				[8] = { ip = const_.rent_ip1, port = 17278, auth = const_.auth, },
				[9] = { ip = const_.rent_ip1, port = 17279, auth = const_.auth, },
			},

			ssdb_db_select = {
				[0]=0, [1]=1, [2]=2, [3]=3, [4]=4, [5]=5, [6]=6, [7]=7, [8]=8, [9]=9,
			},
		},


		ma = {
			ssdb_server = {
				[0] = {	 ip = const_.ip4,    port = 17100,  auth=const_.auth, },
				[1] = {	 ip = const_.ip4,    port = 17101,  auth=const_.auth, },
				[2] = {	 ip = const_.ip4,    port = 17102,  auth=const_.auth, },
				[3] = {	 ip = const_.ip4,    port = 17103,  auth=const_.auth, },
				[4] = {	 ip = const_.ip4,    port = 17104,  auth=const_.auth, },

				[5] = {	 ip = const_.ip2,    port = 17105,  auth=const_.auth, },
				[6] = {	 ip = const_.ip2,    port = 17106,  auth=const_.auth, },
				[7] = {	 ip = const_.ip2,    port = 17107,  auth=const_.auth, },
				[8] = {	 ip = const_.ip2,    port = 17108,  auth=const_.auth, },
				[9] = {	 ip = const_.ip2,    port = 17109,  auth=const_.auth, },

				[11] = { ip = const_.ip2,    port = 17111,  auth=const_.auth, },
			},

			ssdb_db_select = {
				[0] = 0, [1] = 1, [2] = 2, [3] = 3, [4] = 4, [5] = 5, [6] = 6, [7] = 7, [8] = 8, [9] = 9,
				comm = 11,    -- comm data without uin
			},

		},


		battlepass ={
			ssdb_server = {
				[0] = {	 ip = '127.0.0.1',    port = 9000,  auth=const_.auth, },
				[1] = {	 ip = '127.0.0.1',    port = 9001,  auth=const_.auth, },
				[2] = {	 ip = '127.0.0.1',    port = 9002,  auth=const_.auth, },
				[3] = {	 ip = '127.0.0.1',    port = 9003,  auth=const_.auth, },
				[4] = {	 ip = '127.0.0.1',    port = 9004,  auth=const_.auth, },

				[5] = {	 ip = '127.0.0.1',    port = 9005,  auth=const_.auth, },
				[6] = {	 ip = '127.0.0.1',    port = 9006,  auth=const_.auth, },
				[7] = {	 ip = '127.0.0.1',    port = 9007,  auth=const_.auth, },
				[8] = {	 ip = '127.0.0.1',    port = 9008,  auth=const_.auth, },
				[9] = {	 ip = '127.0.0.1',    port = 9009,  auth=const_.auth, },
			},
			ssdb_db_select = {
				[0]=0, [1]=1, [2]=2, [3]=3, [4]=4, [5]=5, [6]=6, [7]=7, [8]=8, [9]=9
			}
		},
		
		business = {
			ssdb_server = {
				[0] = {	 ip = '127.0.0.1',    port = 9000,  auth=const_.auth, },
				[1] = {	 ip = '127.0.0.1',    port = 9001,  auth=const_.auth, },
				[2] = {	 ip = '127.0.0.1',    port = 9002,  auth=const_.auth, },
				[3] = {	 ip = '127.0.0.1',    port = 9003,  auth=const_.auth, },
				[4] = {	 ip = '127.0.0.1',    port = 9004,  auth=const_.auth, },

				[5] = {	 ip = '127.0.0.1',    port = 9005,  auth=const_.auth, },
				[6] = {	 ip = '127.0.0.1',    port = 9006,  auth=const_.auth, },
				[7] = {	 ip = '127.0.0.1',    port = 9007,  auth=const_.auth, },
				[8] = {	 ip = '127.0.0.1',    port = 9008,  auth=const_.auth, },
				[9] = {	 ip = '127.0.0.1',    port = 9009,  auth=const_.auth, },
			},
			ssdb_db_select = {
				[0]=0, [1]=1, [2]=2, [3]=3, [4]=4, [5]=5, [6]=6, [7]=7, [8]=8, [9]=9
			},
		},

		mall =
		{
			ssdb_server =
			{
				[0] = {	 ip = const_.business_mall_ip0,    port = 9000,  auth=const_.auth, },
				[1] = {	 ip = const_.business_mall_ip0,    port = 9001,  auth=const_.auth, },
				[2] = {	 ip = const_.business_mall_ip0,    port = 9002,  auth=const_.auth, },
				[3] = {	 ip = const_.business_mall_ip0,    port = 9003,  auth=const_.auth, },
				[4] = {	 ip = const_.business_mall_ip0,    port = 9004,  auth=const_.auth, },

				[5] = {	 ip = const_.business_mall_ip1,    port = 9005,  auth=const_.auth, },
				[6] = {	 ip = const_.business_mall_ip1,    port = 9006,  auth=const_.auth, },
				[7] = {	 ip = const_.business_mall_ip1,    port = 9007,  auth=const_.auth, },
				[8] = {	 ip = const_.business_mall_ip1,    port = 9008,  auth=const_.auth, },
				[9] = {	 ip = const_.business_mall_ip1,    port = 9009,  auth=const_.auth, },

				[11] = { ip = const_.business_mall_ip0,    port = 9000,  auth=const_.auth, },
			},

			ssdb_db_select = {
				[0]=0, [1]=1, [2]=2, [3]=3, [4]=4, [5]=5, [6]=6, [7]=7, [8]=8, [9]=9, comm=11,
			},
			ip_allow = {
				check = 1,   --0=不检查  1=检查后只打日志   2=检查非法就报错
				list  = '192.168.2.147'  ---空格分隔
			}
		},

		welfare =
		{
			ssdb_server =
			{
				[0] = {	 ip = const_.business_welfare_ip0,    port = 8000,  auth=const_.auth, },
				[1] = {	 ip = const_.business_welfare_ip0,    port = 8001,  auth=const_.auth, },
				[2] = {	 ip = const_.business_welfare_ip0,    port = 8002,  auth=const_.auth, },
				[3] = {	 ip = const_.business_welfare_ip0,    port = 8003,  auth=const_.auth, },
				[4] = {	 ip = const_.business_welfare_ip0,    port = 8004,  auth=const_.auth, },

				[5] = {	 ip = const_.business_welfare_ip1,    port = 8005,  auth=const_.auth, },
				[6] = {	 ip = const_.business_welfare_ip1,    port = 8006,  auth=const_.auth, },
				[7] = {	 ip = const_.business_welfare_ip1,    port = 8007,  auth=const_.auth, },
				[8] = {	 ip = const_.business_welfare_ip1,    port = 8008,  auth=const_.auth, },
				[9] = {	 ip = const_.business_welfare_ip1,    port = 8009,  auth=const_.auth, },

				[11] = { ip = const_.business_welfare_ip0,    port = 8000,  auth=const_.auth, },
			},

			ssdb_db_select = {
				[0]=0, [1]=1, [2]=2, [3]=3, [4]=4, [5]=5, [6]=6, [7]=7, [8]=8, [9]=9, comm=11,
			},
			ip_allow = {
				check = 1,   --0=不检查  1=检查后只打日志   2=检查非法就报错
				list  = '192.168.2.18 192.168.2.125 192.168.2.3 192.168.2.37'  ---空格分隔
			}
		},

		business_advert =
		{
			ssdb_server = {
				[0] = {	 ip = const_.business_advert_ip1,    port = 9000,  auth=const_.auth, },
				[1] = {	 ip = const_.business_advert_ip1,    port = 9001,  auth=const_.auth, },
				[2] = {	 ip = const_.business_advert_ip1,    port = 9002,  auth=const_.auth, },
				[3] = {	 ip = const_.business_advert_ip1,    port = 9003,  auth=const_.auth, },
				[4] = {	 ip = const_.business_advert_ip1,    port = 9004,  auth=const_.auth, },

				[5] = {	 ip = const_.business_advert_ip2,    port = 9005,  auth=const_.auth, },
				[6] = {	 ip = const_.business_advert_ip2,    port = 9006,  auth=const_.auth, },
				[7] = {	 ip = const_.business_advert_ip2,    port = 9007,  auth=const_.auth, },
				[8] = {	 ip = const_.business_advert_ip2,    port = 9008,  auth=const_.auth, },
				[9] = {	 ip = const_.business_advert_ip2,    port = 9009,  auth=const_.auth, },

				[11] = { ip = const_.business_advert_ip1,    port = 9000,  auth=const_.auth, },
			},
			ssdb_db_select = {
				[0]=0, [1]=1, [2]=2, [3]=3, [4]=4, [5]=5, [6]=6, [7]=7, [8]=8, [9]=9, ["comm"]=11,
			},
			ip_allow = {
				check = 1,
				list  = '192.168.2.223 124.71.120.26 192.168.1.135',
			},
		},

		cm = {
			ssdb_server = {
				[0] = {	 ip = const_.cm_ip1,    port = 18200,  auth=const_.auth, },
				[1] = {	 ip = const_.cm_ip1,    port = 18201,  auth=const_.auth, },
				[2] = {	 ip = const_.cm_ip1,    port = 18202,  auth=const_.auth, },
				[3] = {	 ip = const_.cm_ip1,    port = 18203,  auth=const_.auth, },
				[4] = {	 ip = const_.cm_ip1,    port = 18204,  auth=const_.auth, },
				[5] = {	 ip = const_.cm_ip1,    port = 18205,  auth=const_.auth, },
				[6] = {	 ip = const_.cm_ip1,    port = 18206,  auth=const_.auth, },
				[7] = {	 ip = const_.cm_ip1,    port = 18207,  auth=const_.auth, },
				[8] = {	 ip = const_.cm_ip1,    port = 18208,  auth=const_.auth, },
				[9] = {	 ip = const_.cm_ip1,    port = 18209,  auth=const_.auth, },
			},

			ssdb_db_select = {
				[0] = 0, [1] = 1, [2] = 2, [3] = 3, [4] = 4, [5] = 5, [6] = 6, [7] = 7, [8] = 8, [9] = 9,
			},
		},

		manor = 
		{
			ssdb_server = {
				[0]  = { ip = const_.manor_ip1,    port = 17100,  auth=const_.auth, },
				[1]  = { ip = const_.manor_ip1,    port = 17101,  auth=const_.auth, },
				[2]  = { ip = const_.manor_ip1,    port = 17102,  auth=const_.auth, },
				[3]  = { ip = const_.manor_ip1,    port = 17103,  auth=const_.auth, },
				[4]  = { ip = const_.manor_ip1,    port = 17104,  auth=const_.auth, },

				[5]  = { ip = const_.manor_ip2,    port = 17105,  auth=const_.auth, },
				[6]  = { ip = const_.manor_ip2,    port = 17106,  auth=const_.auth, },
				[7]  = { ip = const_.manor_ip2,    port = 17107,  auth=const_.auth, },
				[8]  = { ip = const_.manor_ip2,    port = 17108,  auth=const_.auth, },
				[9]  = { ip = const_.manor_ip2,    port = 17109,  auth=const_.auth, },

				[11] = { ip = const_.manor_ip1,    port = 17111,  auth=const_.auth, },
			},
			ssdb_db_select = {
				[0]=0, [1]=1, [2]=2, [3]=3, [4]=4, [5]=5, [6]=6, [7]=7, [8]=8, [9]=9, comm = 11,
			},			
		},
		gchat = {
			ssdb_server = {
				[0] = {	 ip = const_.ip_group_1,    port = 17100,  auth=const_.auth, },
				[1] = {	 ip = const_.ip_group_1,    port = 17101,  auth=const_.auth, },
				[2] = {	 ip = const_.ip_group_1,    port = 17102,  auth=const_.auth, },
				[3] = {	 ip = const_.ip_group_1,    port = 17103,  auth=const_.auth, },
				[4] = {	 ip = const_.ip_group_1,    port = 17104,  auth=const_.auth, },

				[5] = {	 ip = const_.ip_group_1,    port = 17105,  auth=const_.auth, },
				[6] = {	 ip = const_.ip_group_1,    port = 17106,  auth=const_.auth, },
				[7] = {	 ip = const_.ip_group_1,    port = 17107,  auth=const_.auth, },
				[8] = {	 ip = const_.ip_group_1,    port = 17108,  auth=const_.auth, },
				[9] = {	 ip = const_.ip_group_1,    port = 17109,  auth=const_.auth, },

				[11] = { ip = const_.ip_group_1,    port = 17101,  auth=const_.auth, },
			},

			ssdb_db_select = {
				[0] = 0, [1] = 1, [2] = 2, [3] = 3, [4] = 4, [5] = 5, [6] = 6, [7] = 7, [8] = 8, [9] = 9,
				comm = 11,    -- comm data without uin
			},

		},
	},


	mysql = {
		mapbag = {
			mysql_server = {
				[0] = {	 	host = 'rm-rj974312z4l4w3b33.mysql.rds.aliyuncs.com',
							port = 3306,
							user = 'mmog',
							password = '0NWI2MTAgIC0K#',
							database = 'db_mapbag', },
			},
			mysql_db_select = {
				[0]=0, [1]=0, [2]=0, [3]=0, [4]=0, [5]=0, [6]=0, [7]=0, [8]=0, [9]=0,
			},
	    },

		hot_update = { -- 客户端热更系统
			mysql_server = {
				[0] = {
					host='rm-rj9ue0ft137779i39.mysql.rds.aliyuncs.com', port=3306, user='client_user', password='EBFX4Xv1P6+TOqw+',
					database='hot_update', table_name='t_miniw_kv',
				},
			},
			mysql_db_select = {
				[0]=0, [1]=0, [2]=0, [3]=0, [4]=0, [5]=0, [6]=0, [7]=0, [8]=0, [9]=0,
			},
	    },
		team_mysql = {
			mysql_server = {
				[0] = {
					host='rm-rj9b4h8iuo2scivzg435.mysql.rds.aliyuncs.com', port=3306, user='miniwan_team', password='YzlhZDI0ZTg3OTM5',
					database='db_team', table_name = 't_miniw_kv',
				},
			},
			mysql_db_select = {
				[0]=0, [1]=0, [2]=0, [3]=0, [4]=0, [5]=0, [6]=0, [7]=0, [8]=0, [9]=0,
			},
			ip_allow = { check = 1,	list = ' ',},
		},
    },

};

return ns_config;

